import request from '@/utils/request'

// 渠道管理-列表
export const channelList = data =>
  request({
    url: `/channel/channel/index`,
    method: 'post',
    data,
  })

// 渠道管理-获取渠道列表
export const channelChannel = params =>
  request({
    url: `/channel/channel/channel`,
    method: 'get',
    params,
  })

// 渠道管理-创建
export const channelCreate = data =>
  request({
    url: `/channel/channel/create`,
    method: 'post',
    data,
  })

// 渠道管理-详情
export const channelDetail = params =>
  request({
    url: `/channel/channel/detail`,
    method: 'get',
    params,
  })

// 渠道管理-详情
export const updateChannel = data =>
  request({
    url: `/channel/channel/update`,
    method: 'post',
    data,
  })

// 渠道管理-删除
export const deleteChannel = data =>
  request({
    url: `/channel/channel/delete`,
    method: 'post',
    data,
  })

// 渠道管理-启用禁用
export const channelStatus = data =>
  request({
    url: `/channel/channel/status`,
    method: 'post',
    data,
  })

// 货态管理-获取物流商渠道
export const getLogisticsChannel = data =>
  request({
    url: `/channel/dm/get-logistics-channel`,
    method: 'post',
    data,
  })

// 渠道管理-根据优选类型获取附加费用选项
export const getSurcharge = data =>
  request({
    url: `/channel/surcharge/get-options`,
    method: 'post',
    data,
  })

// 查询 提货地
export const logisticsAddress = data =>
  request({
    url: `/logistics/logistics/address`,
    method: 'post',
    data,
  })

export const copyChannel = data =>
  request({
    url: `/channel/channel/copy`,
    method: 'post',
    data,
  })

  //获取平台运输方式选项
export const transportType = data =>
  request({
    url: `/opts/platform-transport-type`,
    method: 'post',
    data,
  })